<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="仓库ID" prop="warehouseId">
        <el-input
          v-model="queryParams.warehouseId"
          placeholder="请输入仓库ID"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="仓库名称" prop="warehouseName">
        <el-input
          v-model="queryParams.warehouseName"
          placeholder="请输入仓库名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物资来源" prop="enterType">
        <el-select v-model="queryParams.enterType" placeholder="请选择物资来源" clearable>
          <el-option
            v-for="dict in dict.type.enter_type"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="来源详情" prop="source">
        <el-input
          v-model="queryParams.source"
          placeholder="请输入来源详情"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物资分类" prop="goodsType">
        <el-select v-model="queryParams.goodsType" placeholder="请选择物资分类" clearable>
          <el-option
            v-for="dict in dict.type.goods_type"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="物资ID" prop="goodsId">
        <el-input
          v-model="queryParams.goodsId"
          placeholder="请输入物资ID"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物资名称" prop="goodsName">
        <el-input
          v-model="queryParams.goodsName"
          placeholder="请输入物资名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物资单价" prop="goodsPrice">
        <el-input
          v-model="queryParams.goodsPrice"
          placeholder="请输入物资单价"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="入库数量" prop="goodsNum">
        <el-input
          v-model="queryParams.goodsNum"
          placeholder="请输入入库数量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="入库单位" prop="goodsUnit">
        <el-select v-model="queryParams.goodsUnit" placeholder="请选择入库单位" clearable>
          <el-option
            v-for="dict in dict.type.goods_unit"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="入库时间" prop="enterTime">
        <el-date-picker clearable
          v-model="queryParams.enterTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择入库时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="物资品牌" prop="brand">
        <el-input
          v-model="queryParams.brand"
          placeholder="请输入物资品牌"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物资规格" prop="specs">
        <el-input
          v-model="queryParams.specs"
          placeholder="请输入物资规格"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物资型号" prop="model">
        <el-input
          v-model="queryParams.model"
          placeholder="请输入物资型号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单箱数量" prop="singleNum">
        <el-input
          v-model="queryParams.singleNum"
          placeholder="请输入单箱数量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单箱单位" prop="singleUnit">
        <el-select v-model="queryParams.singleUnit" placeholder="请选择单箱单位" clearable>
          <el-option
            v-for="dict in dict.type.goods_unit"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="物资介绍" prop="introduce">
        <el-input
          v-model="queryParams.introduce"
          placeholder="请输入物资介绍"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="报废年限" prop="scrapYear">
        <el-input
          v-model="queryParams.scrapYear"
          placeholder="请输入报废年限"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="生产日期" prop="buyingTime">
        <el-date-picker clearable
          v-model="queryParams.buyingTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择生产日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="货架号" prop="shelfNumber">
        <el-input
          v-model="queryParams.shelfNumber"
          placeholder="请输入货架号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="备注" prop="remarks">
        <el-input
          v-model="queryParams.remarks"
          placeholder="请输入备注"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="入库人ID" prop="userId">
        <el-input
          v-model="queryParams.userId"
          placeholder="请输入入库人ID"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="入库人姓名" prop="userName">
        <el-input
          v-model="queryParams.userName"
          placeholder="请输入入库人姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="审核状态" prop="status">
        <el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable>
          <el-option
            v-for="dict in dict.type.review_status"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="审核结果" prop="apprResult">
        <el-input
          v-model="queryParams.apprResult"
          placeholder="请输入审核结果"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="审核人ID" prop="apprUserId">
        <el-input
          v-model="queryParams.apprUserId"
          placeholder="请输入审核人ID"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="审核人姓名" prop="apprUserName">
        <el-input
          v-model="queryParams.apprUserName"
          placeholder="请输入审核人姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="审核时间" prop="apprTime">
        <el-date-picker clearable
          v-model="queryParams.apprTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择审核时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['goods:inrecord:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['goods:inrecord:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['goods:inrecord:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['goods:inrecord:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="inrecordList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="主键" align="center" prop="id" />
      <el-table-column label="仓库ID" align="center" prop="warehouseId" />
      <el-table-column label="仓库名称" align="center" prop="warehouseName" />
      <el-table-column label="物资来源" align="center" prop="enterType">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.enter_type" :value="scope.row.enterType"/>
        </template>
      </el-table-column>
      <el-table-column label="来源详情" align="center" prop="source" />
      <el-table-column label="物资分类" align="center" prop="goodsType">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.goods_type" :value="scope.row.goodsType"/>
        </template>
      </el-table-column>
      <el-table-column label="物资ID" align="center" prop="goodsId" />
      <el-table-column label="物资名称" align="center" prop="goodsName" />
      <el-table-column label="物资单价" align="center" prop="goodsPrice" />
      <el-table-column label="入库数量" align="center" prop="goodsNum" />
      <el-table-column label="入库单位" align="center" prop="goodsUnit">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.goods_unit" :value="scope.row.goodsUnit"/>
        </template>
      </el-table-column>
      <el-table-column label="入库时间" align="center" prop="enterTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.enterTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="物资品牌" align="center" prop="brand" />
      <el-table-column label="物资规格" align="center" prop="specs" />
      <el-table-column label="物资型号" align="center" prop="model" />
      <el-table-column label="单箱数量" align="center" prop="singleNum" />
      <el-table-column label="单箱单位" align="center" prop="singleUnit">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.goods_unit" :value="scope.row.singleUnit"/>
        </template>
      </el-table-column>
      <el-table-column label="物资介绍" align="center" prop="introduce" />
      <el-table-column label="报废年限" align="center" prop="scrapYear" />
      <el-table-column label="生产日期" align="center" prop="buyingTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.buyingTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="货架号" align="center" prop="shelfNumber" />
      <el-table-column label="物资图片" align="center" prop="goodsPic" />
      <el-table-column label="备注" align="center" prop="remarks" />
      <el-table-column label="入库人ID" align="center" prop="userId" />
      <el-table-column label="入库人姓名" align="center" prop="userName" />
      <el-table-column label="审核状态" align="center" prop="status">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.review_status" :value="scope.row.status"/>
        </template>
      </el-table-column>
      <el-table-column label="审核结果" align="center" prop="apprResult" />
      <el-table-column label="审核人ID" align="center" prop="apprUserId" />
      <el-table-column label="审核人姓名" align="center" prop="apprUserName" />
      <el-table-column label="审核时间" align="center" prop="apprTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.apprTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['goods:inrecord:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['goods:inrecord:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改物资入库记录对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="仓库ID" prop="warehouseId">
          <el-input v-model="form.warehouseId" placeholder="请输入仓库ID" />
        </el-form-item>
        <el-form-item label="仓库名称" prop="warehouseName">
          <el-input v-model="form.warehouseName" placeholder="请输入仓库名称" />
        </el-form-item>
        <el-form-item label="物资来源" prop="enterType">
          <el-select v-model="form.enterType" placeholder="请选择物资来源">
            <el-option
              v-for="dict in dict.type.enter_type"
              :key="dict.value"
              :label="dict.label"
              :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="来源详情" prop="source">
          <el-input v-model="form.source" placeholder="请输入来源详情" />
        </el-form-item>
        <el-form-item label="物资分类" prop="goodsType">
          <el-select v-model="form.goodsType" placeholder="请选择物资分类">
            <el-option
              v-for="dict in dict.type.goods_type"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="物资ID" prop="goodsId">
          <el-input v-model="form.goodsId" placeholder="请输入物资ID" />
        </el-form-item>
        <el-form-item label="物资名称" prop="goodsName">
          <el-input v-model="form.goodsName" placeholder="请输入物资名称" />
        </el-form-item>
        <el-form-item label="物资单价" prop="goodsPrice">
          <el-input v-model="form.goodsPrice" placeholder="请输入物资单价" />
        </el-form-item>
        <el-form-item label="入库数量" prop="goodsNum">
          <el-input v-model="form.goodsNum" placeholder="请输入入库数量" />
        </el-form-item>
        <el-form-item label="入库单位" prop="goodsUnit">
          <el-select v-model="form.goodsUnit" placeholder="请选择入库单位">
            <el-option
              v-for="dict in dict.type.goods_unit"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="入库时间" prop="enterTime">
          <el-date-picker clearable
            v-model="form.enterTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择入库时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="物资品牌" prop="brand">
          <el-input v-model="form.brand" placeholder="请输入物资品牌" />
        </el-form-item>
        <el-form-item label="物资规格" prop="specs">
          <el-input v-model="form.specs" placeholder="请输入物资规格" />
        </el-form-item>
        <el-form-item label="物资型号" prop="model">
          <el-input v-model="form.model" placeholder="请输入物资型号" />
        </el-form-item>
        <el-form-item label="单箱数量" prop="singleNum">
          <el-input v-model="form.singleNum" placeholder="请输入单箱数量" />
        </el-form-item>
        <el-form-item label="单箱单位" prop="singleUnit">
          <el-select v-model="form.singleUnit" placeholder="请选择单箱单位">
            <el-option
              v-for="dict in dict.type.goods_unit"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="物资介绍" prop="introduce">
          <el-input v-model="form.introduce" placeholder="请输入物资介绍" />
        </el-form-item>
        <el-form-item label="报废年限" prop="scrapYear">
          <el-input v-model="form.scrapYear" placeholder="请输入报废年限" />
        </el-form-item>
        <el-form-item label="生产日期" prop="buyingTime">
          <el-date-picker clearable
            v-model="form.buyingTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择生产日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="货架号" prop="shelfNumber">
          <el-input v-model="form.shelfNumber" placeholder="请输入货架号" />
        </el-form-item>
        <el-form-item label="物资图片" prop="goodsPic">
          <el-input v-model="form.goodsPic" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="备注" prop="remarks">
          <el-input v-model="form.remarks" placeholder="请输入备注" />
        </el-form-item>
        <el-form-item label="入库人ID" prop="userId">
          <el-input v-model="form.userId" placeholder="请输入入库人ID" />
        </el-form-item>
        <el-form-item label="入库人姓名" prop="userName">
          <el-input v-model="form.userName" placeholder="请输入入库人姓名" />
        </el-form-item>
        <el-form-item label="审核状态" prop="status">
          <el-select v-model="form.status" placeholder="请选择审核状态">
            <el-option
              v-for="dict in dict.type.review_status"
              :key="dict.value"
              :label="dict.label"
              :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="审核结果" prop="apprResult">
          <el-input v-model="form.apprResult" placeholder="请输入审核结果" />
        </el-form-item>
        <el-form-item label="审核人ID" prop="apprUserId">
          <el-input v-model="form.apprUserId" placeholder="请输入审核人ID" />
        </el-form-item>
        <el-form-item label="审核人姓名" prop="apprUserName">
          <el-input v-model="form.apprUserName" placeholder="请输入审核人姓名" />
        </el-form-item>
        <el-form-item label="审核时间" prop="apprTime">
          <el-date-picker clearable
            v-model="form.apprTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择审核时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="删除状态" prop="delFlag">
          <el-select v-model="form.delFlag" placeholder="请选择删除状态">
            <el-option
              v-for="dict in dict.type.del_status"
              :key="dict.value"
              :label="dict.label"
              :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listInrecord, getInrecord, delInrecord, addInrecord, updateInrecord } from "@/api/goods/inrecord";

export default {
  name: "Inrecord",
  dicts: ['del_status', 'review_status', 'goods_unit', 'enter_type', 'goods_type'],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 物资入库记录表格数据
      inrecordList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        warehouseId: null,
        warehouseName: null,
        enterType: null,
        source: null,
        goodsType: null,
        goodsId: null,
        goodsName: null,
        goodsPrice: null,
        goodsNum: null,
        goodsUnit: null,
        enterTime: null,
        brand: null,
        specs: null,
        model: null,
        singleNum: null,
        singleUnit: null,
        introduce: null,
        scrapYear: null,
        buyingTime: null,
        shelfNumber: null,
        goodsPic: null,
        remarks: null,
        userId: null,
        userName: null,
        status: null,
        apprResult: null,
        apprUserId: null,
        apprUserName: null,
        apprTime: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        warehouseId: [
          { required: true, message: "仓库ID不能为空", trigger: "blur" }
        ],
        warehouseName: [
          { required: true, message: "仓库名称不能为空", trigger: "blur" }
        ],
        enterType: [
          { required: true, message: "物资来源不能为空", trigger: "change" }
        ],
        source: [
          { required: true, message: "来源详情不能为空", trigger: "blur" }
        ],
        goodsType: [
          { required: true, message: "物资分类不能为空", trigger: "change" }
        ],
        goodsId: [
          { required: true, message: "物资ID不能为空", trigger: "blur" }
        ],
        goodsName: [
          { required: true, message: "物资名称不能为空", trigger: "blur" }
        ],
        goodsNum: [
          { required: true, message: "入库数量不能为空", trigger: "blur" }
        ],
        goodsUnit: [
          { required: true, message: "入库单位不能为空", trigger: "change" }
        ],
        enterTime: [
          { required: true, message: "入库时间不能为空", trigger: "blur" }
        ],
        status: [
          { required: true, message: "审核状态不能为空", trigger: "change" }
        ],
        delFlag: [
          { required: true, message: "删除状态不能为空", trigger: "change" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询物资入库记录列表 */
    getList() {
      this.loading = true;
      listInrecord(this.queryParams).then(response => {
        this.inrecordList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        warehouseId: null,
        warehouseName: null,
        enterType: null,
        source: null,
        goodsType: null,
        goodsId: null,
        goodsName: null,
        goodsPrice: null,
        goodsNum: null,
        goodsUnit: null,
        enterTime: null,
        brand: null,
        specs: null,
        model: null,
        singleNum: null,
        singleUnit: null,
        introduce: null,
        scrapYear: null,
        buyingTime: null,
        shelfNumber: null,
        goodsPic: null,
        remarks: null,
        userId: null,
        userName: null,
        status: null,
        apprResult: null,
        apprUserId: null,
        apprUserName: null,
        apprTime: null,
        delFlag: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加物资入库记录";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getInrecord(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改物资入库记录";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateInrecord(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addInrecord(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除物资入库记录编号为"' + ids + '"的数据项？').then(function() {
        return delInrecord(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('goods/inrecord/export', {
        ...this.queryParams
      }, `inrecord_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
